﻿
@{
    ViewBag.Title = "";
    Layout = "~/Views/Shared/_LayoutPay.cshtml";
}
@model Pay.Model.Model.ApplyInfo
<link href="~/Content/layui.css" rel="stylesheet" />
@section scripts{
    <script src="~/Scripts/jquery.unobtrusive-ajax.min.js"></script>
    <script src="~/Scripts/layer.js"></script>
    <script>
        function addSuccess(data)
        {
            parent.layer.msg(data.msg);
        }
        $("#moneyCash").bind("keyup", function () {
            $("#moneyCash").val($("#moneyCash").val().replace(/[^\-?\d.]/g, ''));
        });

        function begin()
        {
            debugger;
            var moneyFee = $("#moneyFee").val();
            var moneyCash = $("#moneyCash").val();
            if (parseFloat(moneyFee) < parseFloat(moneyCash))
            {
                parent.layer.msg("提现金额不能大于余额");
                return false
            }
        }
    </script>
}
<div class="ibox-content">

    @using (Ajax.BeginForm("ApplyCheck", null, new AjaxOptions { HttpMethod = "post", OnSuccess = "addSuccess", UpdateTargetId = "articles", InsertionMode = InsertionMode.Replace }, new { id = "search", @class = "form-horizontal" }))
    {
        <input type="hidden" value="@Model.MerchantId" name="MerchantId" />
        <input type="hidden" value="@Model.Id" name="id" />
        <div class="form-group">
            <label class="col-sm-3 control-label">商户名称：</label>
            <div class="col-sm-8">
                <input type="text" id="moneyFee" disabled="disabled" class="form-control" value="@Model.MerName">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">申请金额：</label>
            <div class="col-sm-8">
                <input type="text" id="moneyFee" disabled="disabled" class="form-control" value="@Model.ApplyAmount.ToString("F2")">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">银行卡：</label>
            <div class="col-sm-8">
                <input type="text" id="moneyFee" disabled="disabled" class="form-control" value="@Model.BankCard">
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-3 col-sm-8">
                <input class="btn btn-primary" name="pass" type="submit" value="通过">
                <input class="btn btn-restore" name="pass" type="submit" value="驳回">
            </div>
        </div>
    }
</div>